#include "StdAfx.h"
#include "IL/ilu.h"
#include "Image.h"
#include "ImageManager.h"

//template <typename T>
//Image<T>::Image()
//{
//  m_isOK = false;
//  m_manager = NULL;
//}

template <typename T>
Image<T>::~Image()
{
  if(!m_manager)
    return;

  m_manager->DeleteImage(this);
  m_isOK = false;
}

template <typename T>
bool Image<T>::Bind()
{
  if( !IsOK() )
    return false;

  m_manager->BindImage(this);

  m_manager->SetCurrentImage(m_name);
  return true;
}
